import request from '@/utils/request'

/**
 * loadGroupSelector
 *
 * @returns {*}
 */
export async function loadGroupSelector() {
  let ret = await request({
    url: '/ddk/group/loadSelector',
    method: 'get',
  });
  if (ret.ok) {
    return ret.data.textValues;
  }
  return []
}

/**
 * loadTeamSelector
 *
 * @returns {*}
 */
export async function loadTeamSelector() {
  let ret = await request({
    url: '/ddk/team/loadSelector',
    method: 'get',
  });
  if (ret.ok) {
    return ret.data.textValues;
  }
  return []
}

/**
 * loadAppSelector
 *
 * @returns {*}
 */
export async function loadAppSelector() {
  let ret = await request({
    url: '/ddk/app/loadSelector',
    method: 'get',
  });
  if (ret.ok) {
    return ret.data.textValues;
  }
  return []
}

/**
 * loadAppSelector
 *
 * @returns {*}
 */
export async function loadAppIdSelector() {
  let ret = await request({
    url: '/ddk/app/loadAppIdSelector',
    method: 'get',
  });
  if (ret.ok) {
    return ret.data.textValues;
  }
  return []
}
